import React from "react";
import { Colors, TouchableOpacity } from "react-native-ui-lib";
import { Ionicons } from "@expo/vector-icons";
import { useColor } from "@/hooks/color";
import { router } from "expo-router";
import { useKeyboard } from "@/hooks/keyboard";

interface ICreateTasksProps {}

const CreateTasks: React.FC<ICreateTasksProps> = ({}) => {
  const onPressByCreateIonic = () => {
    router.navigate({ pathname: "/(modal)/addTask", params: { type: "2008" } });
  };
  return (
    <TouchableOpacity
      className='absolute right-0 bottom-10'
      onPress={onPressByCreateIonic}
      style={{ display: useKeyboard().keyboardVisible ? "none" : "flex" }}>
      <Ionicons name='add-circle-sharp' size={60} color={useColor().colors.primary} />
    </TouchableOpacity>
  );
};

export default CreateTasks;
